@import url('pdf_viewer.css');

.bb-pdf-reader {
    --bb-pdf-view-height: 600px;
    --bb-pdf-toolbar-height: 60px;
    --bb-toolbar-background-color: #3c3c3c;
    position: relative;
    height: calc(var(--bb-pdf-view-height) + var(--bb-pdf-toolbar-height));
}

.bb-view-toolbar {
    height: var(--bb-pdf-toolbar-height);
    background-color: var(--bb-toolbar-background-color);
    display: flex;
    align-items: center;
    color: #fff;
}

    .bb-view-toolbar .btn {
        --bs-btn-color: #fff;
    }

    .bb-view-toolbar .bb-view-controls .dropdown-toggle::after {
        content: none;
    }

    .bb-view-toolbar .dropdown-menu {
        --bs-dropdown-link-active-bg: transparent;
        --bs-dropdown-link-active-color: var(--bs-dropdown-color);
    }

.bb-view-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.bb-view-title {
    padding: 0 1rem;
}

.bb-view-icon {
    padding: .5rem;
    cursor: pointer;
}

    .bb-view-icon.disabled {
        color: #6c757d;
    }

    .bb-view-icon .dropdown-toggle-split {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .bb-view-icon.btn-group .btn {
        --bs-btn-padding-x: 0.5rem;
    }

    .bb-view-icon.btn-group .dropdown-toggle-split {
        padding-left: 0;
        padding-right: 0;
    }

.bb-view-subject {
    white-space: nowrap;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.bb-view-pagesCount {
    padding-inline-end: .5rem;
}

.bb-view-toolbar-main {
    justify-content: center;
    flex: 1;
    min-width: 0;
    width: 1%;
}

    .bb-view-toolbar-main .fit-height .bb-view-fit-height {
        display: none;
    }

    .bb-view-toolbar-main .fit-height .bb-view-fit-width {
        display: block;
    }

    .bb-view-toolbar-main .bb-view-fit-width {
        display: none;
    }

.bb-view-scale {
    display: flex;
    align-items: center;
}

.bb-view-num, .bb-view-scale-input {
    width: 36px;
    text-align: center;
    background-color: #000;
    border: none;
    color: #fff;
}

.bb-view-scale-input {
    width: 40px;
}

.bb-view-slash {
    margin: 0 .5rem;
}

.bb-view-divider {
    width: .6px;
    height: calc(var(--bb-pdf-toolbar-height) / 3);
    background-color: #777;
    margin: 0 0.5rem;
}

    .bb-view-divider + .bb-view-icon {
        padding-inline-start: 0;
    }

.bb-view-controls {
    padding: 0 1rem;
}

    .bb-view-controls .dropdown-toggle {
        padding: 7px;
    }

    .bb-view-controls .dropdown-item .dropdown-item-check {
        display: none;
    }

    .bb-view-controls .dropdown-item.active .dropdown-item-check {
        display: inline-block;
    }

    .bb-view-controls .dropdown-item.active .dropdown-item-icon {
        display: none;
    }

.bb-view-main {
    display: flex;
    width: 100%;
    height: var(--bb-pdf-view-height);
    overflow: hidden;
}

.bb-view-thumbnails {
    --thumb-rotate: 0;
    flex-basis: 0;
    overflow: auto;
    background-color: #28292a;
    padding: 1rem 0;
    transition: flex-basis .3s linear;
}

    .bb-view-thumbnails.show {
        flex-basis: 300px;
    }

.bb-view-thumbnail-item {
    display: block;
    text-align: center;
}

    .bb-view-thumbnail-item:not(:last-child) {
        margin-block-end: 1rem;
    }

    .bb-view-thumbnail-item.active img {
        border: 2px solid #0d6efd;
    }

    .bb-view-thumbnail-item img {
        width: 128px;
        padding: 1px;
        cursor: pointer;
        border: 2px solid #28292a;
        transform: rotate(var(--thumb-rotate));
        margin: 0 auto;
    }

    .bb-view-thumbnail-item .bb-view-thumbnail-group {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

        .bb-view-thumbnail-item .bb-view-thumbnail-group label {
            color: #fff;
        }

.bb-view-content {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    width: 1%;
    height: var(--bb-pdf-view-height);
}

.bb-view-container {
    overflow: auto;
    position: absolute;
    background-color: #000;
    inset: 0;
}

.bb-view-pdf-info {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

    .bb-view-pdf-info:not(.show) {
        display: none;
    }

.bb-view-pdf-backdrop {
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0.6;
    z-index: 1;
}

.bb-view-pdf-dialog {
    background-color: #fff;
    padding: 1rem;
    z-index: 5;
    border-radius: var(--bs-border-radius);
}

.bb-view-pdf-dialog-item {
    display: flex;
    flex-wrap: nowrap;
    width: 344px;
}

    .bb-view-pdf-dialog-item:not(:last-child) {
        margin-block-start: .5rem;
    }

.bb-view-pdf-dialog-label {
    width: 108px;
    white-space: nowrap;
    overflow: hidden;
}

.bb-view-pdf-dialog-close {
    text-align: right;
    padding-block-start: 1rem;
}

    .bb-view-pdf-dialog-close .btn {
        --bs-btn-padding-x: 1rem;
    }
